import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

const routers = [
  {
    path: '/',
    component: () => import('@/views/home')
  },
  {
    path: '/home',
    component: () => import('@/views/home')
  },
  {
    path: '/news',
    component: () => import('@/views/news')
  },
  {
    path: '/newsType',
    component: () => import('@/views/news/type')
  },
  {
    path: '/album',
    component: () => import('@/views/news/photos')
  },
  {
    path: '/sign',
    component: () => import('@/views/sign')
  },
  {
    path: '/signForm',
    component: () => import('@/views/sign/form')
  }
]

const createRouter = () => new Router({
  // mode: 'history', // require service support
  routes: routers
})

const router = createRouter()
export default router
